home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 February / CHIPCD_02_2002.iso / Internet / Macromedia ColdFusion Server 5 / coldfusion-50-win-us.exe / data1.cab / Examples / CFDOCS / snippets / isauthenticated.cfm < prev    next >
Encoding:
Text File  |  2001-06-13  |  1.0 KB  |  39 lines

  1. <!---  This view-only example calls the IsAuthenticated
  2.        function. --->
  3.  
  4. <HTML>
  5. <HEAD>
  6. <TITLE>IsAuthenticated Function</TITLE>
  7. </HEAD>
  8.  
  9. <BASEFONT FACE="Arial, Helvetica" SIZE=2>
  10. <BODY  bgcolor="#FFFFD5">
  11. <H3>IsAuthenticated Function</H3>
  12. <P>The IsAuthenticated function indicates whether a
  13. user has been authenticated.
  14. <P>You typically code this tag in the Application.cfm file. 
  15. <P>This is a view-only example. Refer to the commented
  16. source code for more information.
  17. <!--- This code is from an Application.cfm file --->
  18. <!---
  19. <CFIF NOT IsAuthenticated("Allaire")>
  20.   <CFTRY>
  21.   <CFAUTHENTICATE SECURITYCONTEXT="Allaire" USERNAME=#FORM.user#
  22.     PASSWORD=#FORM.pwd#>
  23.   <CFCATCH TYPE="Security">
  24.   <H3>Authentication error</H3>
  25.     <CFOUTPUT> --->
  26.     <!--- Display the message. Alternatively, you might place
  27.       code here to define the user to the security domain. --->
  28. <!---
  29.     <P>#CFCATCH.message#
  30.     </CFOUTPUT>
  31.   </CFCATCH>
  32.   </CFTRY>
  33. </CFIF>
  34. <CFAPPLICATION NAME="Personnel">
  35. --->
  36.  
  37. </BODY>
  38. </HTML>      
  39.